﻿<div class="modal-header">
    <h3 class="modal-title">枚举值</h3>
</div>
<div class="modal-body">
    <table class="table table-hover table-bordered" m-check>
        <thead>
            <tr>
                <th>显示名称</th>
                <th>显示值</th>
                <th class="col-sm-3"><button ng-click="create()" class="btn btn-primary btn-xs">添加值</button></th>
            </tr>
        </thead>
        <tbody>
        <tr ng-repeat="item in list">
            <td ng-if="!item.isModified">{{item.Name}}</td>
            <td ng-if="item.isModified"><input type="text" class="form-control" ng-model="item.Name"/></td>
            <td ng-if="!item.isModified">{{item.Val}}</td>
            <td ng-if="item.isModified"><input type="text" class="form-control" ng-model="item.Val"/></td>
            <td ng-if="!item.isModified">
                <button type="button" ng-click="remove(item)" class="btn btn-danger btn-xs">删除</button>
                <button type="button" ng-click="edit(item)" class="btn btn-success btn-xs">编辑</button>
            </td>
            <td ng-if="item.isModified">
                <button type="button" ng-click="cancel(item)" class="btn btn-danger btn-xs">取消</button>
                <button type="button" ng-click="save(item)" class="btn btn-success btn-xs">保存</button>
            </td>
        </tr>
        </tbody>
        <tfoot ng-show="!loadingState">
            <tr>
                <td colspan="8">
                    <div class="pull-right">
                        <div class="pagination-info"><span class="ng-binding">共有{{total}}条</span>， <span class="ng-binding">每页显示：{{size}}条</span></div>
                        <uib-pagination boundary-links="true" total-items="total" ng-model="current" max-size="10" ng-change="search(true)" items-per-page="10"
                                        class="pagination-sm" previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
                    </div>
                </td>
            </tr>
        </tfoot>
    </table>
</div>
<div class="modal-footer">
    <button class="btn btn-danger" ng-click="close()">关闭窗口</button>
</div>